home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 4
/
CDPD_IV.bin
/
e
/
mailinglists
/
amigae.0294feb.archive
/
000091_donews!crash!w….std.com!cosell_Mon, 21 Feb 94 09:18:15 PST.msg
< prev
next >
Wrap
Internet Message Format
|
1994-05-26
|
7KB
Received: by bkhouse.cts.com (V1.17-beta/Amiga)
id <1vuc@bkhouse.cts.com>; Mon, 21 Feb 94 09:18:15 PST
Received: from crash by donews.cts.com with uucp
(Smail3.1.28.1 #18) id m0pYV6B-00005kC; Mon, 21 Feb 94 02:30 EST
Received: from relay2.UU.NET by crash.cts.com with smtp
(Smail3.1.28.1 #18) id m0pYUmU-0000QDC; Sun, 20 Feb 94 23:10 PST
Received: from world.std.com by relay2.UU.NET with SMTP
(5.61/UUNET-internet-primary) id AAweee08491; Mon, 21 Feb 94 02:10:00 -0500
Received: by world.std.com (5.65c/Spike-2.0)
id AA11072; Mon, 21 Feb 1994 02:10:00 -0500
In-Reply-To: <9402182149.AA01661@plucky.safb.af.mil>
(from bwills@plucky.safb.af.mil (Barry D Wills))
(at Fri, 18 Feb 94 15:49:19 CST)
X-Mailer: //\\miga Electronic Mail (AmiElm 2.253)
Content-Length: 2838
Date: Sunday, 20 February 1994 18:29 EST
Organization: Fantasy Farm Fibers
Message-Id: <5894:66590@fantasyfarm.com>
From: bernie@fantasyfarm.com (Bernie Cosell)
To: AmigaE@bkhouse.cts.com (The AmigaE Mailing List)
Subject: Re: Bugs in the Mod() function
In <9402182149.AA01661@plucky.safb.af.mil> on Feb 18, Barry D Wills wrote:
} Sounds from your example like:
}
} WriteF('time=12: 15 hours later it's \d\n', Mod(15, 12))
}
} writes:
}
} time=12: 15 hours later it's 3
}
} I still don't see it. Mod(12,12) = 0, just like the example.
Try
WriteF('time=12: 15 hours earlier it's \d\n', Mod(12-15, 12))
} *B) } This will give weird results if c exceeds max-int.
} *B) } Wouter likes it this way, so I made a function that
} *B) } does 32bit modulo:
} *B) }
} *B) } PROC mod(this, bythat) RETURN this-Mul(bythat, Div(this, bythat))
} *B)
} *B) Unfortunately it doesn't. It returns the *remainder*. Not the same
}
} By any definition I am familiar with it does. You better
} hurry up and edumuhcate us before Wouter releases a
} Compiler Authoring Tutorial and suddenly a hundred other
} languages arise, all with a Mod function or operator that
} performs against your expectations. :-D
}
} Ahem, sorry. I couldn't resist the opportunity. :-)
OK, I'll try this slowly. "modulo arithmetic" refers to a
particular sort of arithmetic over a finite field. In every
mathematical context using the term, the concept of "modulo n"
refers to operations over a field best modelled as the integers
from (0, ..., n-1), where each 'integer' is actually an equivalence
class: the member 'k' of the field is actually the equiv class of
all integers of the form (k + x*n), for all integral x. form a
field with the arithmetic operations defined over the integers in
the usual way. There are subtleties if you want to talk about 'n'
being negative or fractional, but those aren't relevant for the
current discussion.
} *B) I've been trying to argue some _basic_ math into hardheaded hardware
} *B) designers for almost 30 years now....
}
} Preseverence! Changing tradition, nearly impossible
} sometimes.
At the least, I _might_ be able to get Wouter to change it from Mod()
to Rem() or _at_least_ get the docs to say explictly that it implements
nothing more than 'remainder' [regardless of what it is called]....
not likely but it's a shot...
[I've given up hope of anyone actually *implementing* a real mod
function, and so if I need to do modular arithmetic [as in the
clock example] the only alternative is to do it brute-force [and
the little expression you wrote above *doesn't* do it,
unfortunately [yes, i did try that! it just gets you the remainder
back again on most [but not all!] architectures]].
Real modular arithmetic is useful and it is really a shame that
because of a bunch of EEs a long time ago not caring [or not knowing
any better], computers now don't support it, when they trivially could.
such is life..
/Bernie\
--
Bernie Cosell bernie@fantasyfarm.com
Fantasy Farm Fibers, Pearisburg, VA (703) 921-2358
From donews!crash!archimed.irit.fr!vintenat Tue, 22 Feb 94 01:33:19 PST
Received: by bkhouse.cts.com (V1.17-beta/Amiga)
id <1vv2@bkhouse.cts.com>; Tue, 22 Feb 94 01:33:19 PST
Received: from crash by donews.cts.com with uucp
(Smail3.1.28.1 #18) id m0pYXTq-0002SvC; Mon, 21 Feb 94 05:03 EST
Received: from archimed.irit.fr by crash.cts.com with smtp
(Smail3.1.28.1 #18) id m0pYXQ9-0000V2C; Mon, 21 Feb 94 01:59 PST
Received: from localhost (vintenat@localhost) by archimed.irit.fr (8.6.4/8.6.4) id LAA08101 for AmigaE@bkhouse.cts.com; Mon, 21 Feb 1994 11:02:37 GMT
Date: Mon, 21 Feb 1994 11:02:37 GMT
Message-Id: <199402211102.LAA08101@archimed.irit.fr>
From: Lionel VINTENAT <vintenat@archimed.irit.fr>
To: AmigaE@bkhouse.cts.com
Subject: Re: v39 .m's
>-> > BTW I'm trying to convert the AmigaDos 3.1 .i includes into .m
>-> files > with IConvert.
>-> >
>-> > Needless to say, there are some .i files that don't want to work.
>-> (eg. > exec/ables.i or exec/exec.i or exec/initializers.i)
>-> >
>-> > Any Suggestions? (I really want to have these includes!)
>->
>-> First convert the .h files into .i files using the C preprocessor.
>-> This will strip out crap that may confuse iconvert. Then iconvert
>-> your new files to .m files. Note that I haven't actually done this
>-> myself, but I have heard it works. It's worth looking into at any
>-> rate.
>
>Is/has anyone been able to do this? If so, are they going to post the 3.1 .m
>files to this list, or make them available for others?
I converted asm includes v40.13 into Amiga E modules this week-end
using IConvert. But I had a lot of problems with A68K/asm include format.
I think I fixed them in 95% of the cases, but for the remaining 5%, I can't
assure you that the conversion is perfect. Anyway, those problems are local
to rarely used modules (like card.m).
I can e-mail them for each of you who want them (I prefer personal
e-mail than a global e-mail to the list because the archive is quite big :-)).
Simply e-mail me. If there are really too much demands for them, I'll e-mail
them directly to the list.
>Apart from HowToCode 7,
>are there any other docs on v39+? I've got the autodocs for v40 - but they
>only cover the new libraries for the cd32...
I have the v39 autodocs (so they exists :-)) but not the v40 :-(...
Lionel
From donews!crash!dcs.gla.ac.uk!mccracal Tue, 22 Feb 94 01:33:41 PST
Received: by bkhouse.cts.com (V1.17-beta/Amiga)
id <1vvh@bkhouse.cts.com>; Tue, 22 Feb 94 01:33:41 PST
Received: from crash by donews.cts.com with uucp
(Smail3.1.28.1 #18) id m0pYZMP-0002VDC; Mon, 21 Feb 94 07:03 EST
Received: from vanuata.dcs.gla.ac.uk by crash.cts.com with smtp
(Smail3.1.28.1 #18) id m0pYYrk-0000TRC; Mon, 21 Feb 94 03:31 PST
Received: from attu.dcs.gla.ac.uk by goggins.dcs.gla.ac.uk with LOCAL SMTP (PP)
id <01573-0@goggins.dcs.gla.ac.uk>; Mon, 21 Feb 1994 11:31:36 +0000
Received: by attu.dcs.gla.ac.uk (4.1/Dumb) id AA27888;
Mon, 21 Feb 94 11:31:32 GMT
Date: Mon, 21 Feb 94 11:31:32 GMT
Message-Id: <9402211131.AA27888@attu.dcs.gla.ac.uk>
From: mccracal@dcs.gla.ac.uk
To: AmigaE@bkhouse.cts.com
Subject: Re: asl difficulties